package com.workflow.workflowproject.controller;

import com.workflow.workflowproject.entity.dto.TaskInfoDto;
import com.workflow.workflowproject.service.ProcessToolsService;
import com.workflow.workflowproject.tools.Result.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Tag(name = "流程工具")
@RequestMapping("/processTools")
public class ProcessToolsController {

    @Autowired
    private ProcessToolsService processToolsService;
    /**
     * 流程预期流程
     *
     * @param
     * @return
     */
    @PostMapping("getExpectedNodes")
    @Operation(summary="流程预期流程",description="流程预期流程")
    public Result getExpectedNodes(@RequestBody TaskInfoDto taskInfoDto) throws Exception{
        return processToolsService.getExpectedNodes(taskInfoDto);
    }
}
